﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using UserBlockServiceReference;

public partial class WebControl_LoginControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        UserBlockClient ubc = new UserBlockClient();
        User u = ubc.GetUser(Login1.UserName, Login1.Password);
        if (u != null)
        {
            FormsAuthentication.RedirectFromLoginPage(Login1.UserName, Login1.RememberMeSet);
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("SiginPage.aspx");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("ResetPassPage.aspx");
    }
}